Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions for Getting and Playing Movies / Saving Movies


UpdateMovieResource

The UpdateMovieResource function replaces the contents of a movie resource in a specified movie file. You specify the movie that is to be placed into the resource.

This function can accommodate single-fork movie files.

pascal OSErr UpdateMovieResource (Movie theMovie, short resRefNum,
                                    short resId, 
                                    const StringPtr resName);
theMovie
Specifies the movie you wish to place in the movie file. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, and NewMovieFromHandle (described on page 2-80, page 2-76, and page 2-78, respectively).
resRefNum
Identifies the movie file that contains the resource to be changed. Your application obtains this value from the OpenMovieFile function, described on page 2-86. If this parameter specifies a single-fork movie file using the movieInDataForResID(-1) constant, the Movie Toolbox places the movie resource into the file's data fork.
resId
Specifies the resource to be changed.
resName
Points to a new name for the resource. If you do not want to change the resource's name, set this parameter to nil.
DESCRIPTION
After updating the movie file, the UpdateMovieResource function clears the movie changed flag, indicating that the movie has not been changed.

ERROR CODES
invalidMovie-2010This movie is corrupted or invalid
File Manager errors
Memory Manager errors
Resource Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996